
<!DOCTYPE html>
<html>

<head>
   
    
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--360浏览器优先以webkit内核解析-->


<title>培训计划管理</title>

<link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
<link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
<link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
<link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
<!-- Sweet Alert -->
<link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">


    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>
   
    </style>

</head>

<body class="white-bg" style="padding: 3px;">
    <div class="page-heade">
       <h2 class="title_color text-center">培训计划管理</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <table class="table table-bordered bud_hei">
            <tr>
                <td colspan="8"><a href="javascript:;" class="btn btn-sm btn-primary" id="addtrainplan">新增培训计划</a></td>
            </tr>
            <tr>
              <td>培训主题：</td>
              <td><input type="text" class="form-control" name=""></td>
              <td>培训类型：</td>
              <td>
                <select name="" id="" class="form-control select">
                    <option value="0">请选择</option>
                    <option value="1">业务培训</option>
                    <option value="2">技能培训</option>
                    <option value="3">管理培训</option>
                    <option value="4">岗位培训</option>
                    <option value="5">其他培训</option>
                    <option value="6">入职培训</option>
                </select>
              </td>
              <td>培训时间：</td>
              <td>
                  <div class="form-group">
                     <input type="text" id="start" class="form-control layer-date " style="min-width:160px;width:160px;display: inline-block;" name="">
                   </div>
                   <div class="form-group">
                    至
                   </div>
                 <div class="form-group">
                   <input type="text" class="form-control layer-date" style="min-width:160px;width:160px;display: inline-block;" id="end" name="">
                 </div>
              </td>
            </tr>
            <tr>
                <td colspan="8" class="text-center"><button class="btn-sm btn-info btn">查询</button><span class="lr_5"></span><button class="btn-sm btn-info btn" type="reset" id="reset">清空查询条件</button></td>
            </tr>
        </table>
</form>
    <table class="table table-striped table-bordered table-hover bud_hei text-center" style="width: 100%;">
        <tr class="info">
            <th class="text-center">No.</th>
            <th class="text-center">培训类型</th>
            <th class="text-center" style="width: 240px">培训名称</th>
            <th class="text-center">培训时间</th>
            <th class="text-center">操作</th>
        </tr>
        <tbody style="border: 0">
            <tr>
                <td>1</td>
                <td>其他培训</td>
                <td><a href="{:url('Other/trainplandetail')}">韩后项目调研会议</a></td>
                <td>2018-01-14</td>
                <td><a href="javascript:;">修改</a>&nbsp;<a href="javascript:;">删除</a></td>
            </tr>
             <tr>
                <td>2</td>
                <td>岗位培训</td>
                <td><a href="{:url('Other/trainplandetail')}">客服技巧培训</a></td>
                <td>2018-02-10</td>
                <td><a href="javascript:;">修改</a>&nbsp;<a href="javascript:;">删除</a></td>
            </tr>
    </tbody>
    </table>
    <h5 class="text-center"  style="font-size: 13px;font-weight: 500">
                    总共有12条记录，第1/2页,当前页<input id="page" type="text"  style="width: 40px" value="1"/><span id="gopage">Go</span>&nbsp;&nbsp;<span id="fistpage">首页</span>&nbsp;&nbsp;
                    每页显示
                    <select id="pagesize">
                        <option value='10' selected>10条</option>
                        <option value='15'>15条</option>
                        <option value='20'>20条</option>

                    </select>
                </h5>

<div id="addtrainplanDiv" class="ibox-content" style="display: none">
    <form action="" class="form-inline">
        <table class="table table-bordered text-center">
            <tr>
                <td style="width: 140px">培训主题<span class="colorRed">*</span></td>
                <td class="text-left"><input type="text" name="" class="form-control"></td>
            </tr>
            <tr>
                <td style="width: 140px">培训类型<span class="colorRed">*</span></td>
                <td class="text-left">
                    <select name="" id="" class="form-control select">
                           <option value="0">请选择</option>
                           <option value="1">业务培训</option>
                           <option value="2">技能培训</option>
                           <option value="3">管理培训</option>
                           <option value="4">岗位培训</option>
                           <option value="5">其他培训</option>
                           <option value="6">入职培训</option>
                    </select>
                </td>
            </tr>
            <tr>
               <td>培训内容</td>
               <td class="text-left"><textarea name="" id="" style="width: 80%;height: 100px;resize: none;" class="form-control"></textarea></td>
            </tr>
            <tr>
                <td>培训时间<span class="colorRed">*</span></td>
                <td class="text-left"><input type="text" class="form-control layer-date" name="" id="thistime"></td>
            </tr>
            <tr>
                <td>参与培训员工<span class="colorRed">*</span></td>
                <td class="text-left">
                      <div class="input-group">
                            <input id="area_id" type="text" placeholder="请输入关键字或空格查询"
                                   class="form-control" value="" style="min-width: 200px;width: 200px">
                            <div class="input-group-btn">
                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                </ul>
                            </div>
                        </div>
                    <a href="javascript:;" id="select_area" class="btn btn-primary btn-sm">选择</a>

                </td>
            </tr>
            <tr>
              <td></td>
              <td></td>
            </tr>
            <tr>
              <td>备注</td>
              <td class="text-left" colspan="3"><textarea name="" id="" style="width: 60%;height: 50px;resize: none;" class="form-control"></textarea></td>
            </tr>
        </table>
    </form>
</div>
<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
 <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
 <script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>

  <script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script>
    $(function () {
        $('body').on('click','input[type=text]',function () {
            this.select()
        })
    })
</script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script>
    
 $("#addtrainplan").click(function(){
     layer.open({
                           type: 1,
                           title: '新增培训计划',
                           area: ['900px', '600px'],
                           fixed: false, //不固定
                           maxmin: true,
                           content: $('#addtrainplanDiv'),
                           btn:["提交","返回"]
                        /*   yes: function (i, o) {
                               var param = $('#form1').serialize()
                           $.post('/index/workflowdb/ysfy_cg.html', param, function (data) {
                               if (data.success) {
                                   swal({title: data.msg}, function () {
                                       layer.close(i)
                                       location.reload()
                                   })
                               } else {
                                   swal(data.msg)
                               }
                           }, 'json')
                       }
*/
                    });


 })

  $(document).ready(function () {
        $('#reset').on('click',function () {
            $("#form1 input").each(function(){
                $(this).val('');
            });
            $("#form1 select").each(function(){
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
    })   

 //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY-MM-DD',
            min: laydate.now(), //设定最小日期为当前日期
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY-MM-DD',
            min: laydate.now(),
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        laydate(start);
        laydate(end);

 var jieshou = $("#area_id");
 sousuo(jieshou);
       function sousuo(id){
            id.bsSuggest({
            allowNoKeyword: false, //是否允许无关键字时请求数据
            multiWord: true, //以分隔符号分割的多关键字支持
            separator: ",", //多关键字支持时的分隔符，默认为空格
            getDataMethod: "url", //获取数据的方式，总是从 URL 获取
            url: 'http://unionsug.baidu.com/su?p=3&t=' + (new Date()).getTime() + '&wd=',
            /*优先从url ajax 请求 json 帮助数据，注意最后一个参数为关键字请求参数*/
            jsonp: 'cb',
            /*如果从 url 获取数据，并且需要跨域，则该参数必须设置*/
            processData: function (json) { // url 获取数据时，对数据的处理，作为 getData 的回调函数
                var i, len, data = {
                    value: []
                };
                if (!json || !json.s || json.s.length === 0) {
                    return false;
                }

                // console.log(json);
                len = json.s.length;

                jsonStr = "{'value':[";
                for (i = 0; i < len; i++) {
                    data.value.push({
                        word: json.s[i]
                    });
                }
                data.defaults = 'baidu';

                //字符串转化为 js 对象
                return data;
            }
        });

          }

laydate({
    elem:"#thistime",
    event:"focus"
})
$("#thistime").val(getNowFormatDate())
   function getNowFormatDate() {
    var date = new Date();
    var seperator1 = "-";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
    return currentdate;
}
</script>
</body>

</html>